package com.wfuhui.modules.order.dao;

import com.wfuhui.common.utils.Query;
import com.wfuhui.modules.order.entity.FinanceDetail;
import com.wfuhui.modules.order.entity.FinanceGroup;
import com.wfuhui.modules.order.entity.FinanceUser;
import com.wfuhui.modules.order.entity.FinanceUserRefund;
import com.wfuhui.modules.order.entity.OrderEntity;
import com.wfuhui.modules.order.entity.OrderGoods;
import com.wfuhui.modules.sys.dao.BaseDao;

import java.math.BigDecimal;
import java.util.List;
import java.util.Map;

import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

/**
 * 订单
 * 
 * @author xiaotian
 * @email codemax@qq.com
 * @date 07-14 13:43:12
 */
@Mapper
public interface OrderDao extends BaseDao<OrderEntity> {

	void updateByOrderNumber(OrderEntity order);

	OrderEntity queryByOrderNumber(String orderNumber);

	List<OrderGoods> queryStatistics(Map<String, Object> params);

	BigDecimal queryTotalAmount(Map<String, Object> params);

	List<FinanceGroup> queryGroup(Query query);
	
    List<FinanceUser> queryUser(Query query);

    List<FinanceUserRefund> queryUserRefund(Query query);

    int queryTotalUserRefund(Map<String, Object> params);

    List<FinanceDetail> queryFinanceList(Map<String, Object> params);

	List<Map<String, String>> queryOrderCount();
}
